Limits on the consumption of a variety of system resources by a process
and each process it creates may be obtained with _gggg_eeee_tttt_rrrr_llll_iiii_mmmm_iiii_tttt and set with
_ssss_eeee_tttt_rrrr_llll_iiii_mmmm_iiii_tttt.
_gggg_eeee_tttt_rrrr_llll_iiii_mmmm_iiii_tttt_6666_4444 and _ssss_eeee_tttt_rrrr_llll_iiii_mmmm_iiii_tttt_6666_4444 allow 32-bit programs to set 64-bit limits.
This is particularly useful for shells and other 32-bit programs which
fork 64-bit binaries. Unless otherwise specified, _gggg_eeee_tttt_rrrr_llll_iiii_mmmm_iiii_tttt_6666_4444 and
_ssss_eeee_tttt_rrrr_llll_iiii_mmmm_iiii_tttt_6666_4444 function in exactly the same manner as _gggg_eeee_tttt_rrrr_llll_iiii_mmmm_iiii_tttt and
_ssss_eeee_tttt_rrrr_llll_iiii_mmmm_iiii_tttt.
Each call to either _gggg_eeee_tttt_rrrr_llll_iiii_mmmm_iiii_tttt or _ssss_eeee_tttt_rrrr_llll_iiii_mmmm_iiii_tttt identifies a specific resource
to be operated upon as well as a resource limit. A resource limit is a
pair of values: one specifying the current (soft) limit, the other a
maximum (hard) limit. Soft limits may be changed by a process to any
value that is less than or equal to the hard limit. A process may
(irreversibly) lower its hard limit to any value that is greater than or
equal to the soft limit.
Only a the super-user can raise a hard limit.
Both hard and soft limits can be changed in a single call to _ssss_eeee_tttt_rrrr_llll_iiii_mmmm_iiii_tttt
subject to the constraints described above.
_gggg_eeee_tttt_rrrr_llll_iiii_mmmm_iiii_tttt_6666_4444 and _ssss_eeee_tttt_rrrr_llll_iiii_mmmm_iiii_tttt_6666_4444 are provided to allow 32 bit applications to
manipulate 64 bit limit values. For example, the _RRRR_LLLL_IIII_MMMM_IIII_TTTT______FFFF_SSSS_IIII_ZZZZ_EEEE can be set
as large as 0xffffffffff with _ssss_eeee_tttt_rrrr_llll_iiii_mmmm_iiii_tttt_6666_4444 when using the xfs filesystem.
When using the 32 bit interfaces, limits may have an infinite value of
_RRRR_LLLL_IIII_MMMM______IIII_NNNN_FFFF_IIII_NNNN_IIII_TTTT_YYYY (0x7fffffff). In this case _r_l_p is a pointer to _s_t_r_u_c_t
_r_l_i_m__t is an arithmetic data type to which objects of type _i_n_t, _s_i_z_e__t,
and _o_f_f__t can be cast without loss of information. Specifying the
_RRRR_LLLL_IIII_MMMM______IIII_NNNN_FFFF_IIII_NNNN_IIII_TTTT_YYYY value as the limit in a _ssss_eeee_tttt_rrrr_llll_iiii_mmmm_iiii_tttt call may allow the value
of the resource to exceed 0x7fffffff. This is because specifying
_RRRR_LLLL_IIII_MMMM______IIII_NNNN_FFFF_IIII_NNNN_IIII_TTTT_YYYY as the limit indicates to the system to use no limit other
than that imposed by the operating system. When _gggg_eeee_tttt_rrrr_llll_iiii_mmmm_iiii_tttt is used to
retrieve a limit which has a value greater than that which can be
represented by an _r_l_i_m__t, the value returned is the maximum value
representable by an _r_l_i_m__t. This value is currently _UUUU_IIII_NNNN_TTTT______MMMM_AAAA_XXXX.
When using the 64 bit interfaces, limits may have an infinite value of
_RRRR_LLLL_IIII_MMMM_6666_4444______IIII_NNNN_FFFF_IIII_NNNN_IIII_TTTT_YYYY (0x7fffffffffffffff). In this case _r_l_p is a pointer to
_s_t_r_u_c_t _r_l_i_m_i_t_6_4 that includes the following members:
_r_l_i_m_6_4__t is an arithmetic data type to which objects of type _l_o_n_g _l_o_n_g
and _o_f_f_6_4__t can be cast without loss of information.
The possible resources, their descriptions, and the actions taken when
current limit is exceeded, are summarized below:
RRRRLLLLIIIIMMMMIIIITTTT____CCCCOOOORRRREEEE The maximum size of a core file in bytes that may be
created by a process. A limit of _0 will prevent the
creation of a core file. The writing of a core file
will terminate at this size.
RRRRLLLLIIIIMMMMIIIITTTT____CCCCPPPPUUUU The maximum amount of CPU time in seconds used by a
process. _SSSS_IIII_GGGG_XXXX_CCCC_PPPP_UUUU is sent to a process which exceeds
this limit. If the process is holding or ignoring
_SSSS_IIII_GGGG_XXXX_CCCC_PPPP_UUUU, the behavior is scheduling class defined.
Unless the _SSSS_VVVV_RRRR_4444______SSSS_IIII_GGGG_NNNN_AAAA_LLLL_SSSS variable in _////_eeee_tttt_cccc_////_dddd_eeee_ffff_aaaa_uuuu_llll_tttt_////_llll_oooo_gggg_iiii_nnnn
is set to NO, this signal will be ignored by default.
RRRRLLLLIIIIMMMMIIIITTTT____DDDDAAAATTTTAAAA The maximum size of a process's heap in bytes. A _bbbb_rrrr_kkkk(2)
which attempts to exceed this limit will fail with errno
set to _EEEE_NNNN_OOOO_MMMM_EEEE_MMMM.
RRRRLLLLIIIIMMMMIIIITTTT____FFFFSSSSIIIIZZZZEEEE The maximum size of a file in bytes that may be created
by a process. A limit of _0 will prevent the creation of
a file. A process which attempts to exceed this limit
will fail with errno set to _SSSS_IIII_GGGG_XXXX_FFFF_SSSS_ZZZZ. If the process is
holding or ignoring _SSSS_IIII_GGGG_XXXX_FFFF_SSSS_ZZZZ, continued attempts to
increase the size of a file beyond the limit will fail
with errno set to _EEEE_FFFF_BBBB_IIII_GGGG. Unless the _SSSS_VVVV_RRRR_4444______SSSS_IIII_GGGG_NNNN_AAAA_LLLL_SSSS
variable in _////_eeee_tttt_cccc_////_dddd_eeee_ffff_aaaa_uuuu_llll_tttt_////_llll_oooo_gggg_iiii_nnnn is set to NO, this signal
will be ignored by default.
RRRRLLLLIIIIMMMMIIIITTTT____NNNNOOOOFFFFIIIILLLLEEEE The maximum number of open file descriptors that the
process can have. Functions that attempt to create new
file descriptors beyond this limit will fail with errno